package cn.com.surker.control.service.impl;

import cn.com.surker.control.entity.ControlExpend;
import cn.com.surker.control.dao.ControlExpendDao;
import cn.com.surker.control.service.ControlExpendService;
import cn.com.surker.util.StringUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 工控机原始消耗表 服务实现类
 * </p>
 *
 * @author admin
 * @since 2025-01-06
 */
public abstract class ControlExpendBaseImpl extends ServiceImpl<ControlExpendDao, ControlExpend> implements ControlExpendService {

	@Resource
	protected ControlExpendDao controlLabExpendDao;

	@Override
	public List<ControlExpend> findList(String erpDb, Long batchId) {
		if (StringUtils.isBlank(erpDb)) {
			return null;
		}
		List<ControlExpend> controlExpendList = controlLabExpendDao.findByBatchId(erpDb, batchId);
		return controlExpendList;
	}

	@Override
	protected Class<ControlExpend> currentModelClass() {
		return ControlExpend.class;
	}
}